



struct BookLoad{
    BookLoad(){
        idx = 0;
    }
    static unordered_map<string ,pair<int, VectorSized<BuffUnit>>  > ticker_umap;
    static unordered_map<string , VectorSized<double>> ticker_cmp;

    static vector<string> s_book;
    static void loading(const string &line) {
        split(line, s_book, ",");
        if (line.size() < BOOK_SIZE) {
            return;
        }
        if (stoi(s_book[BOOK_VOL]) == 0) {
            return;
        }
        auto vec = ticker_umap.find(s_book[BOOK_TICKER]);
        if (vec != ticker_umap.end()) {  // buff 已存在该ticker
            BuffUnit line;
            line.vol = stoi(s_book[BOOK_VOL]);
            line.ask = stof(s_book[BOOK_A]) * 1000;
            line.asize = stoi(s_book[BOOK_ASIZE]);
            line.bid = stof(s_book[BOOK_B]) * 1000;
            line.bsize = stof(s_book[BOOK_BSIZE]);
            vec->second.push(line);
        } else {
            ticker_umap.insert({s_book[BOOK_TICKER], {0, VectorSized<BuffUnit>()} });
            auto &vec = ticker_umap[s_book[BOOK_TICKER]];
            BuffUnit line;
            line.vol = stoi(s_book[BOOK_VOL]);
            line.ask = stof(s_book[BOOK_A]) * 1000;
            line.asize = stoi(s_book[BOOK_ASIZE]);
            line.bid = stof(s_book[BOOK_B]);
            line.bsize = stof(s_book[BOOK_BSIZE]) * 1000;
            vec.push(line);

            /// ticker_cmp 新增 ticker
            ticker_cmp.insert({s_book[BOOK_TICKER], VectorSized<double>()});

        }
    }

    void load(string file){
    }


    /////// running time do something

    int find_vol(){

    }
    int idx;

};
